def Solve():
    result = 0
    for x in xrange(100, 1000):
        for y in xrange(100, 1000):
            z = str(x * y)
            if z == z[::-1]:
                result = max(result, x * y)
    return result
